/*
 * @Description: 
 * @Author: 赵大壮
 * @Date: 2021-12-06 17:18:37
 * @LastEditTime: 2024-07-22 06:36:14
 * @LastEditors: 赵大壮
 */
import { Component, Vue, Inject } from "vue-property-decorator";
import DZServiceVideo from "../../service/DZServiceVideo";

@Component({
    components: {}
})
export default class Index extends Vue {

    s_video = new DZServiceVideo();

    created() {
        this.action_list_video();
        this.s_video.net_list_type_dic();
    }

    mounted() {

    }

    beforeDestroy() {

    }

    action_list_video() {
        this.s_video.net_list_video();
    }

    action_video_add(id) {
        this.$router.push({ path: "/video/info", query: { id: id } });
    }

    action_del_video(id) {
        this.s_video.net_del_video(id, () => {
            this.action_list_video();
        })
    }

    action_page_change(cur_page) {
        this.s_video.m_page.page = cur_page;
        this.action_list_video();
    }

    /** 保存排序 */
    action_sort_save(row) {
        this.s_video.net_edit_sort(row.id, row.sort, () => {
            this.action_list_video();
        });
    }

    action_move_up(row) {
        this.s_video.net_move_up(row.id, () => {
            this.action_list_video();
        });
    }

    action_move_down(row) {
        this.s_video.net_move_down(row.id, () => {
            this.action_list_video();
        });
    }

    action_move_top(row) {
        this.s_video.net_move_top(row.id, () => {
            this.action_list_video();
        });
    }

    action_cancel_top(row) {
        this.s_video.net_cancel_top(row.id, () => {
            this.action_list_video();
        });
    }
}